define(['jquery'],function($){
    var remind = function(wai,innerbtn){
        var l1 = wai.offset().left;
        var l2 = innerbtn.offset().left;
        var l3 = innerbtn.width();
        innerbtn.click(function(){
            var text = $("input[type='text']").val(),
                pass = $("input[type='password']").val(),
                textarea = $("textarea").val();
            if( text == '' || pass == ''||textarea == ''){
                $(".write-info").css({"left":l2-l1+l3+20+'px'});
                $(".write-info").fadeIn(500);
                setTimeout(function(){
                    $(".write-info").fadeOut(500);
                },3000);
                
                return false;
            }
            if($(".repass").val()!=$(".pass").val()){
                $(".write-info").html("两次输入的密码不一致");
                $(".write-info").css({"left":l2-l1+l3+20+'px'});
                $(".write-info").fadeIn(500);
                setTimeout(function(){
                    $(".write-info").fadeOut(500);
                },3000);
                console.log(444);
                return false;
            }
        })
    }
    return{
        remind:remind
    }
})